<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <title>注册</title>
    <meta charset="utf-8">
    <script type="text/javascript">
        function change() {
            document.getElementById("validate").src = "getImage?random="+ Math.random();
        }
        window.onload=function(){
            change();
        }
    </script>
</head>


<body>

    <form th:action="@{/registerForm}" method="post">

        用户名：<input type="text" name="username"  placeholder="用户名唯一"><br>

        真实姓名：<input type="text" name="realname" ><br>

        密&nbsp;&nbsp; 码：<input type="password" name="password" ><br>

        <!-- 单选 -->
        性别：男<input type="radio" name="sex" value="男" checked="checked">
             女<input type="radio" name="sex" value="女" ><br>

        <div class="frm"> 验证码：
            <input type="text" name="code" class="code" />
            <span>
                <img src="getImage" id="validate" onclick="change()" />
                <a href="javascript:change()">点图片点文字都可以更换验证码</a>
        </span>
        </div>

        <input type="submit" name="" value="提交" placeholder="">

        <input type="reset" name="重置" value="重置" placeholder=""><br>
    </form>
    <a th:href="@{/login}">注册</a>
    <p th:text="${msg}"></p>
</body>
</html>

